package de.fh.ffm;

/**
 * Interface for the Subject of the Observer Pattern.
 * 
 * Allows Observers to register to get updated when the subject changes it's
 * observable state
 * 
 * @author seiwe
 */
public interface Subject {
	/**
	 * Register an Observer with this Subject
	 * 
	 * @param o
	 *            the interested Observer
	 */
	void addObserver ( Observer o );

	/**
	 * Unregister an Observer with this Subject
	 * 
	 * @param o
	 *            the Observer which is not interested any more
	 */
	void removeObserver ( Observer o );

	/**
	 * Update the Observers when this Subject's observable state changed
	 */
	void notifyObservers ();
}
